using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FoxCommerce.MVC.Web.Models;
using FoxCommerce.MVC.Service.IServices;
using FoxCommerce.MVC.Domain.Entities;
using Microsoft.Practices.Unity;
using FoxCommerce.MVC.Service;
using FoxCommerce.MVC.Web.Base;

namespace FoxCommerce.MVC.Web.Controllers
{
    public class PicturesController : EntityController<IPictureService, Picture>
    {
        public PicturesController(IPictureService pictureService)
            : base(pictureService)
        {

        }
        //private readonly IPictureService m_pictureService;
        //public PicturesController(IPictureService pictureService)
        //{
        //    this.m_pictureService = pictureService;
        //}
        //public ViewResult Index()
        //{
        //    return View(m_pictureService.All);
        //}

        //public ViewResult Details(int id)
        //{
        //    return View(m_pictureService.Find(id));
        //}

        //public ActionResult Create()
        //{
        //    return View();
        //}

        //[HttpPost]
        //public virtual ActionResult Create(Picture entity)
        //{
        //    if (ModelState.IsValid)
        //    {
        //        m_pictureService.Insert(entity);
        //        m_pictureService.Save();
        //        return RedirectToAction("Index");
        //    }
        //    else
        //    {
        //        return View();
        //    }
        //}



        //public ActionResult Edit(int id)
        //{
        //    return View(m_pictureService.Find(id));
        //}
        //[HttpPost]
        //public ActionResult Edit(Picture entity)
        //{
        //    if (ModelState.IsValid)
        //    {
        //        m_pictureService.Update(entity);
        //        m_pictureService.Save();
        //        return RedirectToAction("Index");
        //    }
        //    else
        //    {
        //        return View();
        //    }
        //}



        //public ActionResult Delete(int id)
        //{
        //    return View(m_pictureService.Find(id));
        //}

        ////
        //// POST: /TEntityType/Delete/5

        //[HttpPost, ActionName("Delete")]
        //public ActionResult DeleteConfirmed(int id)
        //{
        //    m_pictureService.Delete(id);
        //    m_pictureService.Save();

        //    return RedirectToAction("Index");
        //}

    }
}

